package exam.web.action;

import exam.common.util.KeyCommon;
import exam.common.util.NullCheckUtil;
import exam.web.action.base.ExaminationActionBase;

/**
 * <p>DeleteExaminationAction</p>
 * <p>Action xóa đề thi với examId</p>
 * 
 * @author Phong
 * @version 5/5/2012
 */
public class DeleteExaminationAction extends ExaminationActionBase {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Override
	public String execute() throws Exception {
		String examId = request.getParameter(KeyCommon.EXAM_ID);
		if (NullCheckUtil.isNotNull(examId)
				&& examDAO.deleteExamination(Long.valueOf(examId))) {
			addActionMessage(getText("Xóa câu hỏi thành công"));
			return SUCCESS;
		}
		return ERROR;
	}
}
